package com.example.deploysinggle.test1.common.util;

import com.example.deploysinggle.test1.common.enums.SyncDatEnum;
import com.example.deploysinggle.test1.interface1.ABC;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO 调用放直接调用distribute 即可
 * @date 2024/12/26 12:03
 */
public abstract class AbstractSyncDataService {
    //定义一个待执行的方法标准
    public abstract ResponseEntity<ABC>
    examMethod(ABC.Aa a, List<ABC> list )throws Exception;


    //按照 不同类型调用aa 方法
    public static ResponseEntity<ABC>
    distribute(ABC.Aa a, SyncDatEnum syncDatEnum, List<ABC> list) throws Exception{
        return SyncDatEnum.getService(syncDatEnum).examMethod(a, list);
    }
}
